import axios from 'axios';
import { diaryRagDomain } from 'src/config/base';


export const getRagData = async (uid: string, query: any) => {
    try {
        const response = await axios.post(`${diaryRagDomain}/getRagData`, {
            uid,
            query
        }, {
            timeout: 5000
        });
        return response.data;
    } catch (error) {
        console.error('Error fetching data:', error);
        throw error;
    }
};


// export default getRagData;